package com.google.code.ptrends.catparsers;

import com.google.code.ptrends.catparsers.utils.IntPair;
import com.google.code.ptrends.common.entities.Category;
import com.google.code.ptrends.entities.ETLItem;

/**
 * Base interface for factory producing ETLItem instances
 * @author ternovykh
 *
 */
public interface ETLItemFactory {
	
	/**
	 * Parses raw {@link ETLItem}s Items source (file or stream) using given start/end position inside source.
	 * Source may be stream, file, XML etc  
	 * @param categoryPositions Start and end position inside source of {@link ETLItem}s 
	 * @return Collection of {@link ETLItem} instance
	 */
	ETLItem[] parse(Category category, int supplierID, IntPair categoryPositions);
}
